package com.study.modules.rabbitmq.testSimple;

import com.study.config.RabbitmqConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class SimpleMqReceiverService {

    @RabbitListener(queues = RabbitmqConfig.SIMPLE_FANOUT_QUEUE)
    public void receiveMsg(String msg) {
        System.out.println("监听队列：" + RabbitmqConfig.SIMPLE_FANOUT_QUEUE + "，收到消息: " + msg);
    }

}
